import request from '@/utils/request/request';

// 配套零星分页查询
export function getPage(params) {
  return request.get('/api/procurement/require/require-receive/page', {
    params,
  });
}
// 保存资源平衡-需求合并策略-计划员
export function saveOptionPlanner(data: any) {
  return request.post(
    '/api/procurement/require/require-option/planner/save',
    data
  );
}
// 配套零星分页查询
export function getSummaryPage(params) {
  return request.get('/api/procurement/require/require-summary/page', {
    params,
  });
}
// 汇总
export function summary(data: any) {
  return request.post('/api/procurement/require/require-summary/summary', data);
}
// 创建汇总任务-同步
export function asyncSummary(data: any) {
  return request.post(
    '/api/procurement/require/require-summary/task/asyncSummary',
    data
  );
}
// 创建全部汇总任务
export function asyncSummaryAll(data: any) {
  return request.post(
    '/api/procurement/require/require-summary/task/asyncSummaryAll',
    data
  );
}
// 撤销汇总
export function revocation(data: any) {
  return request.post(
    '/api/procurement/require/require-summary/revocation',
    data
  );
}
// 汇总结果列表
export function getTaskPage(params) {
  return request.get('/api/procurement/require/require-summary/taskPage', {
    params,
  });
}
